Optimal. Leaf size=74 \[ -\frac{a \cot ^3(c+d x)}{3 d}+\frac{a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac{a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac{a \cot (c+d x) \csc (c+d x)}{8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.126206, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2838, 2611, 3768, 3770, 2607, 30} \[ -\frac{a \cot ^3(c+d x)}{3 d}+\frac{a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac{a \cot (c+d x) \csc ^3(c+d x)}{4 d}+\frac{a \cot (c+d x) \csc (c+d x)}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2838
Rule 2611
Rule 3768
Rule 3770
Rule 2607
Rule 30
Rubi steps
\begin{align*} \int \cot ^2(c+d x) \csc ^3(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx+a \int \cot ^2(c+d x) \csc ^3(c+d x) \, dx\\ &=-\frac{a \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac{1}{4} a \int \csc ^3(c+d x) \, dx+\frac{a \operatorname{Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{d}\\ &=-\frac{a \cot ^3(c+d x)}{3 d}+\frac{a \cot (c+d x) \csc (c+d x)}{8 d}-\frac{a \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac{1}{8} a \int \csc (c+d x) \, dx\\ &=\frac{a \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac{a \cot ^3(c+d x)}{3 d}+\frac{a \cot (c+d x) \csc (c+d x)}{8 d}-\frac{a \cot (c+d x) \csc ^3(c+d x)}{4 d}\\ \end{align*}
Mathematica [A] time = 0.0509982, size = 135, normalized size = 1.82 \[ -\frac{a \cot ^3(c+d x)}{3 d}-\frac{a \csc ^4\left (\frac{1}{2} (c+d x)\right )}{64 d}+\frac{a \csc ^2\left (\frac{1}{2} (c+d x)\right )}{32 d}+\frac{a \sec ^4\left (\frac{1}{2} (c+d x)\right )}{64 d}-\frac{a \sec ^2\left (\frac{1}{2} (c+d x)\right )}{32 d}-\frac{a \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{8 d}+\frac{a \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 102, normalized size = 1.4 \begin{align*} -{\frac{a \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{3\,d \left ( \sin \left ( dx+c \right ) \right ) ^{3}}}-{\frac{a \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{4\,d \left ( \sin \left ( dx+c \right ) \right ) ^{4}}}-{\frac{a \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{8\,d \left ( \sin \left ( dx+c \right ) \right ) ^{2}}}-{\frac{\cos \left ( dx+c \right ) a}{8\,d}}-{\frac{a\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{8\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.11194, size = 108, normalized size = 1.46 \begin{align*} -\frac{3 \, a{\left (\frac{2 \,{\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac{16 \, a}{\tan \left (d x + c\right )^{3}}}{48 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.65404, size = 377, normalized size = 5.09 \begin{align*} -\frac{16 \, a \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + 6 \, a \cos \left (d x + c\right )^{3} + 6 \, a \cos \left (d x + c\right ) - 3 \,{\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) + 3 \,{\left (a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{48 \,{\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.329, size = 157, normalized size = 2.12 \begin{align*} \frac{3 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 8 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 24 \, a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - 24 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \frac{50 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 24 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 8 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 3 \, a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4}}}{192 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]